/*
* INSANE - Interactive Structural Analysis Environment
*
* Copyright (C) 2003-2005
* Universidade Federal de Minas Gerais
* Escola de Engenharia
* Departamento de Engenharia de Estruturas
* 
* Author's email :    insane@dees.ufmg.br
* Author's website :  http://www.dees.ufmg.br/insane
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
package br.ufmg.dees.insane.model.femModel.loads;

import java.io.Serializable;
import java.util.HashMap;

import br.ufmg.dees.insane.model.femModel.node.Node;
import br.ufmg.dees.insane.util.pointValues.PointValues;

public class Loading implements Serializable{
    
	private static final long serialVersionUID = 1L;
    
    private String label;
    private HashMap<Node, PointValues> nodalValues;
    
    public Loading() {
		this.nodalValues = new HashMap<Node, PointValues>(2);
	}

	/**
     * @return Returns the label.
     */
    public String getLabel() {
        return label;
    }

    /**
     * @param label The label to set.
     */
    public void setLabel(String label) {
        this.label = label;
    }
    
    /**
	 * The method return the nodalValues.
	 * @return  Returns The nodalValues.
	 */
	public HashMap getNodalValues() {
		return this.nodalValues;
	}

	/**
	 * The method set the field nodalValues from the parameter nodalValues.
	 * @param nodalValues  The nodalValues to set.
	 */
	public void setNodalValues(HashMap<Node, PointValues> nodalValues) {
		this.nodalValues = nodalValues;
	}
    
    /** Returns the node point values.
     * @param key A node.
     * @return The node point values.
     */
    public PointValues getNodalValues(Node key) {
        return (PointValues)nodalValues.get(key);
    }
    
    /** Returns true if the nodalValues has the node as key.
     * @param key A node.
     * @return True if the node has the node as key.
     */
    public boolean nodalValuesContainsKey(Node key) {
        return nodalValues.containsKey(key);
    }
    
    /** Sets a point value at a key of nodalValues.
     * @param key A node.
     * @param pv The node point values to set.
     */
    public void setNodalValues(Node key, PointValues pv) {
        this.nodalValues.put(key, pv);
    }
    
}